﻿@model sBlog.Net.Areas.Admin.Models.AdminCategoriesViewModel

@{
    ViewBag.Title = string.Format("Manage Categories || {0}", Model.Title);
}

<div id="left" style="float: left; width: 20%; padding: 5px;">     
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title">Add a Category</h3>
      </div>
      <div class="panel-body">
        <input type="text" class="inputBoxBigCategory" id="txtCat" name="txtCat" size="20" /><br /><br />
          <p class="pull-right">
              <input type="button" class="btn btn-primary" id="btnCreateCategory" value="Add Category" />
          </p>  
        <br /><br />
        <span class="add-msg"></span>
      </div>
    </div>
</div>
<div id="right" style="float: left; width: 60%; padding-left: 20px">
    <table class="table table-striped" id="manage-table">
        <thead>
            <tr>
                <th>Category Name</th>
                <th>Category Slug</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var category in Model.Categories)
            {
                @Html.Partial("Category", category)
            }
        </tbody>
    </table>
    
    <ul class="pagination">
        @Html.PageLinks(Model.PagingInfo, x => Url.Action("ManageCategories", new { page = x }))
    </ul>
    @Html.HiddenFor(model => Model.OneTimeCode)
</div>
